{% extends "professor/base.html" %}

{% block title %}教务管理系统 --选课的学生{% endblock %}

{% block page_content %}
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <h1 align="left">选了本课程的学生</h1>
        </div>
    </div>

    <div class="row">
        <div class="col-md-4 col-md-offset-4" style="background-color:lavender;">
            <!-- 在这里列出已教课程 -->
            {% if student_list %}
                <ul class="students">
                    {% for item in student_list %}
                        {% if section.section_id %}
                            <li class="student">
                                <div class="student-content">
                                    <div class="student-body">
                                        <ul>
                                            <li><p>学号：{{ item[0].student_id }}</p></li>
                                            <li><p>姓名：{{ item[0].student_name }}</p></li>
                                            {% if item[1]!=None %}
                                                <li><p>成绩：{{ item[1] }}</p></li>
                                            {% endif %}
                                        </ul>

                                    </div>
                                    <div class="student-footer">
                                        <a href="{{ url_for('pfs.professor_submit_grades', student_id=item[0].student_id, section_id=section.section_id) }}">
                                            <span class="label label-primary">为此学生录入成绩</span>
                                        </a>
                                    </div>
                                </div>
                            </li>
                        {% endif %}
                    {% endfor %}
                </ul>
            {% else %}
                暂无学生选此课程
            {% endif %}
        </div>
    </div>
{% endblock %}